package winter_vacation_homework.day_12;

import java.util.Arrays;

/**
 * 【LeetCode题号: 88. 合并两个有序数组】
 * https://leetcode-cn.com/problems/merge-sorted-array/
 */
public class MergesTwoOrderedArrays {
    public void merge(int[] nums1, int m, int[] nums2, int n) {
        for (int i = m; i < nums1.length; i++) {
            nums1[i] = nums2[--n];
        }
        Arrays.sort(nums1);
    }
}
